package com.hopu.v1.controller.admin.classes.attendance;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hopu.v1.pojo.classes.attendance.AttendanceRegular;
import com.hopu.v1.pojo.common.R;
import com.hopu.v1.service.admin.classes.attendance.AttendanceRegularService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/admin/classes/attendanceRegular")
public class AttendanceRegularController {
    @Autowired
    private AttendanceRegularService attendanceRegularService;

    @Cacheable("selectAll")
    @GetMapping("selectAll")
    public R selectAll(Page<AttendanceRegular> page){
        LambdaQueryWrapper<AttendanceRegular> wrapper = new LambdaQueryWrapper<>();
        return R.ok(this.attendanceRegularService.page(page,wrapper));
    }
}
